package cn.xianshu.feign.client;

import cn.xianshu.domain.Login;
import cn.xianshu.dto.LoginAndMealDto;
import cn.xianshu.util.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 此类来调用 认证中心
 */
@FeignClient(value = "service-auth", fallbackFactory = loginFeignClientFallbackFactory.class)
@RequestMapping("/login")
public interface LoginFeignClient {

    // 保存一个login
    @RequestMapping(value="/save",method= RequestMethod.POST)
    AjaxResult save(@RequestBody Login login);


    // 保存一个login 和套餐
    @RequestMapping(value="/saveLoginAndMeal",method= RequestMethod.POST)
    AjaxResult saveLoginAndMeal(@RequestBody LoginAndMealDto loginAndMealDto);


}
